home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / rbbs_pc / mnt_201.zip / MNTDATA.C < prev    next >
Text File  |  1992-01-05  |  5KB  |  86 lines

  1. /****************************************************************************/
  2. /* DATA module for RBBSMNT v2.01, a maintenance utility for RBBS-PC         */
  3. /*╒═════════════════════════════ NOTICE ═══════════════════════════════════╕*/
  4. /*│  A limited license is granted to all users of this program to make     │*/
  5. /*│  copies if this program and distribute those copies to other users     │*/
  6. /*│  on the following three conditions:                                    │*/
  7. /*│                                                                        │*/
  8. /*│    1.   This notice is NOT altered, bypassed or removed,               │*/
  9. /*│    2.   The program is not to be distributed to others in modified     │*/
  10. /*│         form. You may make changes for your own non-commercial use     │*/
  11. /*│    3.   No fee is to be charged (or any other consideration received)  │*/
  12. /*│         for copying or distributing these programs without an express  │*/
  13. /*│         written agreement with J. Terpstra, Bamestra RBBS, PO Box 66,  │*/
  14. /*│         Beemster, The Netherlands.                                     │*/
  15. /*│                                                                        │*/
  16. /*│Copyright (C) 1991, 1992 - Jan Terpstra, Bamestra RBBS, The Netherlands.│*/
  17. /*╘════════════════════════════════════════════════════════════════════════╛*/
  18. /****************************************************************************/
  19.  
  20. #include "rbbsmnt.h"                    /* definitions for this program     */
  21.  
  22.   /**************************************************************************/
  23.   /* character data                                                         */
  24.   /**************************************************************************/
  25.  
  26. char *msgfile;                          /* pointer to current MSG file      */
  27. char *no_memory = "! Error allocating memory for";
  28. char *usrfile;                          /* pointer to current USR file      */
  29. char logbuf[TXTLEN];                    /* log scratch pad                  */
  30. char wkf[_MAX_PATH] = "\0";             /* work directory                   */
  31. char wrkfile[_MAX_PATH] = "\0";         /* work directory                   */
  32.  
  33.   /**************************************************************************/
  34.   /* integer data                                                           */
  35.   /**************************************************************************/
  36.  
  37. int bads = FALSE;                       /* bad records found                */
  38. int deads;
  39. int do_clean = FALSE;
  40. int do_renum = FALSE;
  41. int do_usr = FALSE;
  42. int exempt = 32000;                     /* user level exempt from cleanup   */
  43. int first_rec = 0;                      /* first msg rec in msg file        */
  44. int high_msg = 1;                       /* highest msg numbe in msg file    */
  45. int lives = 0;                          /* # msgs alive                     */
  46. int kills = 0;                          /* # of msgs to kill                */
  47. int last_rec = 0;                       /* last record in msg file          */
  48. int max_age = 32000;                    /* max age of msgs                  */
  49. int max_msgs = 999;                     /* max # msgs in msg file           */
  50. int max_since = 32000;                  /* days after user deleted          */
  51. int next_rec = 0;                       /* next free rec in msg file        */
  52. int now;
  53. int num_users = 0;                      /* # of usr record in usr file      */
  54. int pip = FALSE;
  55. int quiet = FALSE;
  56. int use_wrk = FALSE;
  57. int save_em = FALSE;
  58. int fixhdr = FALSE;
  59.  
  60.   /**************************************************************************/
  61.   /* some default C structures                                              */
  62.   /**************************************************************************/
  63.  
  64. struct stat f;                          /* structure for FILE INFO          */
  65. struct tm *today;                       /* structure for time info          */
  66. time_t ltime;                           /* placeholder for time             */
  67.  
  68.   /**************************************************************************/
  69.   /* custom data                                                            */
  70.   /**************************************************************************/
  71.  
  72. MSGINFO *mlist;                         /* pointer to array of msg info     */
  73. RBBSHDR hdr;                            /* message header record            */
  74. RBBSMSG msg_hdr;                        /* message file header record       */
  75. RBBSNODE noderec;                       /* node record within MESSAGES file */
  76. RBBSUSER *ulist;                        /* pointer to in-core user array    */
  77. RBBSUSER urec;                          /* user record                      */
  78. char far *hlist;                        /* index of used records            */
  79. long to_month[12] =
  80. {
  81.    0L, 31L, 59L, 90L, 120L, 151L, 181L, 212L, 243L, 273L, 304L, 334L
  82. } ;
  83.  
  84. /*--------------------------------------------------------------------------*/
  85.  
  86.